﻿using System;

namespace JinianNet.Web
{
    public partial class Cache
    {
        public static JinianNet.Caching.ICache Create(CacheMode mode)
        {
            switch (mode)
            {
                case CacheMode.File:
                    return new FileCache();
                case CacheMode.Memory:
                    return new MemoryCache();
                case CacheMode.Static:
                    return new StaticCache();
                default :
                    return null;
            }
        }
        public enum CacheMode
        {
            File,
            Memory,
            Static
        }
    }
}
